﻿using System.Collections.Generic;
using System.Diagnostics;

namespace Central.Linq.Mvc {
	/// <summary>
	/// Представляет набор фильтров
	/// для конкретной страницы
	/// для конкретного пользователя
	/// </summary>
#if !DEBUG

	[DebuggerStepThrough]
#endif
	public sealed class PreparableFilters {

		public PreparableFilters() {
			this.ActionFilters = new List<FilterDefinition>();
		}

		public PreparableFilters(string userName, string controllerName, string actionName)
			: this() {
			this.ActionName = actionName; this.ControllerName = controllerName; this.UserName = userName;
		}

		public PreparableFilters(string userName, string controllerName, string actionName, IList<FilterDefinition> filters) {
			this.ActionName = actionName; this.ControllerName = controllerName; this.UserName = userName; this.ActionFilters = filters;
		}

		public IList<FilterDefinition> ActionFilters { get; set; }

		public string ControllerName { get; set; }

		public string ActionName { get; set; }

		public string UserName { get; set; }
	}
}